<?php

/**
 *
 * @author dzelenika
 * @todo 99% da ne radi dobro testirati
 *
 */
class wpWebMeni extends bee\webPane
{
  private $strMeni;
  private $webmeni;
  private $arr_meni;

  public function onCreate($evt)
  {
    $webMeni                   = new webMeni();
    $rs                        = new rowSet($webMeni);
    $arr_meni                  = array();

    while($rs->getRow($webMeni))
    {
      if(owns_acces($app->getUser()->id, $webMeni->command))
      {
        $arr_meni[]            = clone $webMeni;
      }
    }
    factory::save($DSDoc->setTableFromArr($arr_meni, "webMeni"), "strWebMeni");
  }


	public function onDraw($evt)
	{
	  $DSDoc->appendFragment("/form/tables", $str_meni);
		parent::onDraw($evt);

	}


}